 jQuery(function(){
    var t_propiedades = jQuery("#tabla_posts").jqGrid(
        { url:'/ajax/posts/',
          datatype: "json",
          colNames:['n#','Descripció','Publicat', 'Tancat'],
          colModel:[
                     {name:'id',index:'id', width:20,sortable:true, search:false},
                     {name:'title', index:'headline', width:575,sortable:true, search:true},
                     {name:'pub_date', index:'pub_date', width:110,sortable:true, search:true},
                     {name:'closed', width:70,sortable:false, search:false,align:"center",formatter:'checkbox'}
                     ],
          rowNum:25,
          rowList:[25,50,100,200],
          //imgpath: gridimgpath,
          pager: jQuery('#pjmap'),
          sortname: 'id',
          gridview: true,
          jsonReader: {repeatitems: false, id:"0"},
          viewrecords: true,
          sortorder: "desc",
          caption:"Listat de Posts" ,
          toolbar: [true,"top"],
          viewsortcols: true,
          height:420}).navGrid('#pager2',{edit:false,add:false,del:false});
 })
